.class public Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;
.super Landroid/os/AsyncTask;
.source "Details.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lde/dealdoktor/app/activities/Details$DealPagerAdapter;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "GetPostsTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field private posts:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/PostDAO;",
            ">;"
        }
    .end annotation
.end field

.field requestId:I

.field final synthetic this$1:Lde/dealdoktor/app/activities/Details$DealPagerAdapter;


# direct methods
.method public constructor <init>(Lde/dealdoktor/app/activities/Details$DealPagerAdapter;)V
    .locals 0
    .parameter

    .prologue
    .line 145
    iput-object p1, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->this$1:Lde/dealdoktor/app/activities/Details$DealPagerAdapter;

    .line 143
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;
    .locals 3
    .parameter "args"

    .prologue
    .line 177
    :try_start_0
    iget-object v1, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->this$1:Lde/dealdoktor/app/activities/Details$DealPagerAdapter;

    #getter for: Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->context:Landroid/content/Context;
    invoke-static {v1}, Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->access$2(Lde/dealdoktor/app/activities/Details$DealPagerAdapter;)Landroid/content/Context;

    move-result-object v1

    sget v2, Lde/dealdoktor/app/App;->postsCurrentPage:I

    invoke-static {v1, v2}, Lde/dealdoktor/app/data/DataModel;->getCategoryPosts(Landroid/content/Context;I)Ljava/util/ArrayList;

    move-result-object v1

    iput-object v1, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->posts:Ljava/util/ArrayList;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 183
    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    :goto_0
    return-object v1

    .line 178
    :catch_0
    move-exception v0

    .line 179
    .local v0, e:Ljava/lang/Exception;
    const-string v1, "exception"

    const-string v2, "GetPostsTask doInBackground"

    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 180
    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    goto :goto_0
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Ljava/lang/Boolean;)V
    .locals 3
    .parameter "success"

    .prologue
    const/4 v2, 0x0

    .line 157
    iget v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->requestId:I

    sget v1, Lde/dealdoktor/app/App;->requestId:I

    if-ne v0, v1, :cond_1

    .line 158
    iget-object v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->posts:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 159
    sget v0, Lde/dealdoktor/app/App;->postsCurrentPage:I

    add-int/lit8 v0, v0, 0x1

    sput v0, Lde/dealdoktor/app/App;->postsCurrentPage:I

    .line 161
    :cond_0
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_2

    .line 162
    iget-object v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->this$1:Lde/dealdoktor/app/activities/Details$DealPagerAdapter;

    #setter for: Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->isLoading:Z
    invoke-static {v0, v2}, Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->access$1(Lde/dealdoktor/app/activities/Details$DealPagerAdapter;Z)V

    .line 171
    :cond_1
    :goto_0
    return-void

    .line 165
    :cond_2
    iget-object v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->posts:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_1

    .line 166
    sget-object v0, Lde/dealdoktor/app/App;->posts:Ljava/util/ArrayList;

    iget-object v1, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->posts:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 167
    iget-object v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->this$1:Lde/dealdoktor/app/activities/Details$DealPagerAdapter;

    #setter for: Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->isLoading:Z
    invoke-static {v0, v2}, Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->access$1(Lde/dealdoktor/app/activities/Details$DealPagerAdapter;Z)V

    goto :goto_0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->onPostExecute(Ljava/lang/Boolean;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 2

    .prologue
    .line 150
    sget v0, Lde/dealdoktor/app/App;->requestId:I

    add-int/lit8 v0, v0, 0x1

    sput v0, Lde/dealdoktor/app/App;->requestId:I

    iput v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->requestId:I

    .line 151
    iget-object v0, p0, Lde/dealdoktor/app/activities/Details$DealPagerAdapter$GetPostsTask;->this$1:Lde/dealdoktor/app/activities/Details$DealPagerAdapter;

    const/4 v1, 0x1

    #setter for: Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->isLoading:Z
    invoke-static {v0, v1}, Lde/dealdoktor/app/activities/Details$DealPagerAdapter;->access$1(Lde/dealdoktor/app/activities/Details$DealPagerAdapter;Z)V

    .line 152
    return-void
.end method
